<template>
    <h3>Key属性添加到 v-for</h3>
    <p v-for="(item, index) in names" :key="index">{{ item }}</p>
    <div v-for="item in result" :key="item.avatar">
    <p>{{ item.title }}</p>
    <p>{{ item.avatar }}</p>
    </div>
    
</template>

<script>
export default{
    data () {
        return {
            names:["demo111","demo222","demo333"],
            result:[{
                "id":123,
                "title":"demo11111111111111111",
                "avatar":"http://www.baidu.com"
            },{
                "id":456,
                "title":"demo22222222222222222",
                "avatar":"http://www.baidu.com"
            },{
                "id":789,
                "title":"demo3333333333333333",
                "avatar":"http://www.baidu.com"
            },
            ],
        }
    }
}
</script>